package org.kmfdm.horrorscope.metamodel.beans;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.ManyToOne;



import org.kmfdm.horrorscope.core.beans.BaseBean;
import org.kmfdm.horrorscope.enums.ChartType;
import org.kmfdm.horrorscope.enums.Gender;
import org.kmfdm.horrorscope.metamodel.*;



@SuppressWarnings("serial")
@Entity
public class ChartBean extends BaseBean implements Chart {
	
	private String chartName;
	private Customer owner;
	private String description;
	private Gender chartGender;
	private ChartType type; 
	private Date lastEdit;
	
	
	public ChartBean() {
		super();
	}
	@Basic
	public String getChartName() {
		return chartName;
	}
	
	public void setChartName(String chartName) {
		this.chartName = chartName;
	}
	@ManyToOne(cascade = {CascadeType.ALL},
			targetEntity=CustomerBean.class)	
	public Customer getOwner() {
		return owner;
	}
	public void setOwner(Customer owner) {
		this.owner = owner;
	}
	@Basic
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	@Enumerated(EnumType.STRING)
	public Gender getChartGender() {
		return chartGender;
	}
	
	public void setChartGender(Gender chartGender) {
		this.chartGender = chartGender;
	}
	@Enumerated(EnumType.STRING)
	public ChartType getType() {
		return type;
	}
	public void setType(ChartType type) {
		this.type = type;
	}
	@Basic
	public Date getLastEdit() {
		return lastEdit;
	}
	public void setLastEdit(Date lastEdit) {
		this.lastEdit = lastEdit;
	}
	
	
	
	
}
